# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=iphoneanalyzer
pkgver=2.1.0
pkgrel=3
groups=('blackarch' 'blackarch-forensic' 'blackarch-mobile')
pkgdesc='Allows you to forensically examine or recover date from in iOS device.'
url='http://downloads.sourceforge.net/project/iphoneanalyzer/'
arch=('any')
license=('GPL3')
depends=('java-environment' 'bash')
source=("http://downloads.sourceforge.net/project/iphoneanalyzer/executable%20jar%20builds/iphoneanalyzer.fat.gui-$pkgver.jar")
sha512sums=('479f5073503e9d936cc49d7d4402faa2091f520b751f1a25d8a8cebbdb795464c52d0806171b462c63ebe1299beb83f6f1e40a466deacaa4467b0332e309366c')

package() {
  install -dm 755 "$pkgdir/usr/bin"

  install -Dm 755 "$pkgname.fat.gui-$pkgver.jar" \
    "$pkgdir/usr/share/$pkgname/$pkgname.jar"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
java -jar $pkgname.jar "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

